<?php 
/**
 * 模板类
 */

abstract class Lin_Template
{
	/*
	 * 展示模板加载
	 */
	public function template()
	{
		$request = Lin_Request::getInstance();
		
		//若为Ajax方法不调用模板。
		if (substr($request->getAction(), 0, 1) == '_')
		{
			return;
		}
		
		$tplFile = APPLICATION_PATH . '/design/' . DEFAULT_THEME .'/' . ucfirst($request->getModel()) . '/' . ucfirst($request->getController()) . '/' . strtolower($request->getAction()) . '.phtml';
		if (!file_exists($tplFile))
		{
			die("<p>Template file[$tplFile] don't exist.</p>");
		}
		include($tplFile);		
	}
	
}


?>